Duplicate a module to a different folder

Hi,
I'm trying to duplicate a formal module using the copy()command but it only seems to allow me to identify a target in the current folder. Anyone know of a way to do the same thing but have the duplicate created in a different folder? The reason is the user will only have read access to the area containing the original module.
Cheers,
Andrew
SystemAdmin - Fri Jul 23 05:12:47 EDT 2010

Re: Duplicate a module to a different folder
Ben_Sharples - Fri Jul 23 08:05:35 EDT 2010

If the user just wants a duplicate copy you could just use copy and paste in the database window.

If you were wanting to have the duplicate linked to the original to assess the impact of changes. Create a blank module in the target loaction and import the attributes from the original module. then use the copy objects function

Re: Duplicate a module to a different folder
llandale - Sun Jul 25 18:55:11 EDT 2010

This thread shows a way with DXL using the clipboard:
https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14426493

It seems to me that I've done it the harder but safer way:

bool copy(ModName_,string,string)
string move(Item,Folder)
string rename(ModName_,string,string)

perhaps:
copy(module(NameExistingModuleFull, "yyy", ExistingDescription)
move(item("yyy"), folderNew)
rename(module(fullName(folderNew) "/yyy"), BaseNameOfExistingModule, ExistingDescription)

  • Louie